#include <stdio.h>

/*分数比较*/

int zxgb(int a,int b);
void main()
{
    int j,i,k,l,m,n;
    printf("Input two FENSHU :\n");
    scanf("%d/%d,%d/%d",&i,&j,&k,&l);
    m=zxgb(j,l)/j*i;
    n=zxgb(j,l)/l*k;
    if(m>n)    printf("%d/%d > %d/%d",i,j,k,l);
    else if(m==n)    printf("%d/%d = %d/%d",i,j,k,l);
    else printf("%d/%d < %d/%d",i,j,k,l);
}

int zxgb(int a,int b)
{
    long int c;
    int d;
    if(a<b)  c=a,a=b,b=c;
    for(c=a*b;b!=0;)
    {
        d=b;
        b=a%b;
        a=d;
    }
    return ((int) c/a);
    
}
